from langchain.agents import create_agent

from common.llm_builder import calculate_calc_tool, llm

graph = create_agent(
    model=llm,
    tools=calculate_calc_tool(),
    system_prompt="You are a helpful assistant"
)

inputs = {"messages": [{"role": "user", "content": "what is the weather in sf"}]}

for chunk in graph.stream(inputs, stream_mode="updates"):
    print(chunk)
